The present invention relates to a spatial filter used for smoothing or emphasizing an image represented by image data and, more particularly, to a spatial filter for improving spatial frequency response and increasing a processing rate.
Spatial filtering is known as one of the basic image processing techniques. Spatial filters include a low-pass filter, a high-pass filter and a band-pass filter in the same manner as in filters for a normal time frequency range. The low-pass filter is used, for example, as a smoothing filter for removing a noise component of the image. The high-pass filter is often used as an edge-emphasizing filter for emphasizing a high-frequency component to emphasize an edge portion of the image so as to allow an operator easy visual recognition. The band-pass filter is used for emphasizing a spatial frequency range corresponding to significant data.
By using a low-pass filter, i.e., the smoothing filter, another spatial filter such as a high-pass filter or a band-pass filter can be obtained.
As shown in FIG. 1A, when original image data A is filtered through a smoothing filter 1, and the resultant smoothed image data B is subtracted by a subtracter 2 from the original image data A, a high-pass filter 3 having the characteristics shown in FIG. 1B can be obtained. In addition, when the filters 3 and 1 respectively having cut-off frequencies a and b (a&lt;b) are coupled in cascade, as shown in FIG. 2A, a band-pass filter having the characteristics shown in FIG. 2B can be obtained.
Conventional methods for providing a smoothing filter include FFT (fast Fourier transform), convolution using a normal coefficient impulse response, repetition by a 3.times.3 filter, and a uniformly weighting filter algorithm.
The conventional uniformly weighting filter algorithm is described in "High-Speed Algorithm in Computed Image Processing" by Toriwaki, Yokoi and Fukumura, JYOUHOUSYORI, Vol. 17, No. 3, pp. 215-221 (1976). This filtering method can achieve the fastest image processing among the above-described conventional methods.
A "uniformly weighting filter algorithm II" in the above reference will be described in detail.
An impulse response of a square filter is given as a constant below: ##EQU1## where K and L are respectively support sizes.
In the first step, a working image x'.sub.(i,j) shown in FIG. 3A is prepared: ##EQU2## where x.sub.(l,m) is the original image. The working image x'.sub.(i,j) represents a sum of gradations of the original image in a square region (i.e., a hatched region) having vertices (1,1), (i,1), (1,j) and (i,j). The number of operations for deriving the working image x'.sub.(i,j) is twice for each pixel. The addition will be described with reference to FIG. 3B. For example, the addition for the working image is performed following the order corresponding to raster scanning of a television image or the like from the left end to the right end of the first line (j=1), the left end to the right end of the second line (j=2), . . . . A working register sequentially stores sums of x.sub.(1,j), x.sub.(2,j), . . . and x.sub.(i-1,j). When the content of the working register is defined as W, the working image x'.sub.(i,j) is obtained by the two operations below: EQU W.rarw.W+x.sub.(i,j) ( 3) EQU x'.sub.(i,j) .rarw.W+x'.sub.(i,j-1) ( 4)
In the second step, a smoothed image y.sub.(i,j) is obtained by using the working image x'.sub.(i,j) derived in the first step: ##EQU3## The smoothed image y.sub.(i,j) is derived from the following operation (see FIG. 3C): ##EQU4## More particularly, referring to FIG. 3C, if a sum of gradations in the hatched region is added, the smoothed image is obtained. In this case, the operation rate is high irrespective of the support size.
The conventional smoothing filter including a filter based on the uniformly weighting filter algorithm cannot obtain sufficient characteristics under the condition where strict spatial frequency response is required. This is because a considerably large ripple or gain variation RP occurs near the cut-off frequency as indicated by an example (i.e., the support size=35) of the frequency characteristics in FIG. 4. The ripple component causes an artifact in the processed image. The artifact degrades the image quality of the resultant image, poor appearance, and a visual recognition error. For example, the artifact in the image obtained by a medical diagnostic apparatus causes a diagnostic error, resulting in a crucial problem.
When a direct filtering algorithm is used instead of using a high-speed processing algorithm, a ripple-free filter can be obtained. In this case, however, the processing rate is greatly decreased.
The directivity (in the Fourier space) of the frequency characteristics is one of the important factors for determining filter performance. This directivity indicates a change in frequency characteristics which is caused by the direction of the Fourier space. In other words, directivity indicates what changes occur in the frequency characteristics in accordance with the .omega.1, .omega.2 and diagonal (i.e., an intermediate direction between the .omega.1 and .omega.2 directions) directions. For example, as shown in FIGS. 5A and 5B (in the case of a support size=19.times.19), the frequency characteristics vary in accordance with changes in directions; the frequency characteristics along the .omega.1 and .omega.2 directions are poor. FIG. 5B shows only a portion where .omega.2 is large with respect to the line I--I of FIG. 5A.